package me.jessyan.mvparms.demo.di.module.car;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import me.jessyan.mvparms.demo.mvp.contract.car.PayCostRcordContract;
import me.jessyan.mvparms.demo.mvp.model.car.PayCostRcordModel;


@Module
public class PayCostRcordModule {
    private PayCostRcordContract.View view;

    /**
     * 构建PayCostRcordModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public PayCostRcordModule(PayCostRcordContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    PayCostRcordContract.View providePayCostRcordView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    PayCostRcordContract.Model providePayCostRcordModel(PayCostRcordModel model) {
        return model;
    }
}